package drg_group.zhejiang_2022.ADRG;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

import drg_group.zhejiang_2022.Base;
import drg_group.zhejiang_2022.MedicalRecord;
import drg_group.zhejiang_2022.DRG.MDCB_DRG;

public class BJ1 {
    public static String group(MedicalRecord record){
        String[] adrg_zd={};
        String[] adrg_zd1={};
        String[] adrg_ss={"00.1000","01.0100","01.0100x002","01.0200x001","01.0900x002","01.0900x003","01.0900x004","01.0900x005","01.0901","01.1100x001","01.1300x001","01.1300x002","01.1301","01.1600x001","01.1700x001","01.2900","02.1208","02.9303","02.9304","03.9100x004","04.0100x003","04.0101","04.0201","04.0202","04.0204","04.0205","04.0300x002","04.0300x003","04.0300x009","04.0300x010","04.0300x013","04.0301","04.0302","04.0303","04.0308","04.0400x025","04.0401","04.0402","04.0403","04.0404","04.0405","04.0406","04.0700x030","04.0701","04.0702","04.0703","04.0704","04.0708","04.0709","04.0710","04.0712","04.0722","04.0723","04.0724","04.0725","04.0727","04.0728","04.0729","04.0730","04.1201","04.2x00x017","04.2x01","04.2x06","04.2x07","04.2x08","04.2x09","04.3x00x019","04.3x00x025","04.3x00x028","04.3x01","04.3x02","04.3x03","04.3x04","04.4101","04.4102","04.4103","04.4200x006","04.4200x007","04.4200x014","04.4200x015","04.4200x016","04.4201","04.4203","04.4204","04.4205","04.4206","04.4207","04.4212","04.4900x038","04.5x00x005","04.5x00x009","04.5x01","04.5x11","04.6x00x017","04.6x01","04.6x12","04.7100","04.7200","04.7300","04.7400x032","04.7401","04.7402","04.7403","04.7404","04.7405","04.7406","04.7500x001","04.7501","04.9900","29.9200x001","29.9200x002","31.9100x001","31.9100x002","44.0100","86.0501","92.3000","92.3001","92.3002","92.3101","92.3102","92.3200x001","92.3201","92.3202","92.3300","92.3900"};
        String[] adrg_ss1={};
        
        if (true && record.ssList!=null && record.ssList.length>0 && Base.intersect(record.ssList,adrg_ss)){
            Base.groupMessages.putMessage(record.Index,"符合BJ1入组条件，匹配规则：某一手术匹配");
                
            if (MDCB_DRG.BJ11_group(record)){
                return "BJ11";
            }
    
            if (MDCB_DRG.BJ13_group(record)){
                return "BJ13";
            }
    
            if (MDCB_DRG.BJ15_group(record)){
                return "BJ15";
            }

            return "BJ1";
        }else{
            return "";
        }
    }
}

